Image processing method and apparatus

ABSTRACT

The provided is an image processing method, which includes: converting a to-be-processed image into a gray image; performing Guass fuzzy processing having a predefined fuzzy radius on the gray image, and obtaining a reference image; and according to gray values of reference pixels of the reference image, decreasing a pixel value of a pixel of the to-be-processed image corresponding to a reference pixel whose gray value is larger than a gray threshold, increasing a pixel value of a pixel of the to-be-processed image corresponding to a reference pixel whose gray value is smaller than the gray threshold, and obtaining an adjusted image.

This application is a continuation of, and claims the benefit ofpriority of, U.S. patent application Ser. No. 15/103,621, filed Jun. 10,2016. U.S. patent application Ser. No. 15/103,621 claims the benefit ofpriority from Chinese Patent Application, No. 201310690424.0, entitled“Image Processing Method and System” and filed on Dec. 13, 2013. Theabove-identified applications are hereby incorporated by reference intheir entirety for all purposes. Any and all applications for which aforeign or domestic priority claim is identified in the Application DataSheet as filed with the present application are hereby incorporated byreference in their entirety under 37 CFR 1.57.

TECHNICAL FIELD

The present disclosure relates to image processing technologies, andmore particularly to an image processing method and apparatus.

BACKGROUND

Image contrast refers to measurement of different luminance levelsbetween the brightest color “white” and the darkest color “black” in animage. The larger the difference between the brightest color “white” andthe darkest color “black” is, the larger the image contrast is. Thesmaller the difference between the brightest color “white” and thedarkest color “black” is, the smaller the image contrast is. Theadjustment of image contrast adjustment may improve the display effectof an image. A conventional method for adjusting the image contrast isimplemented as follows. An image is converted into a HSV (Hue,Saturation, Value) color space or a LAB (L represents luminance, Arepresents a range from carmine to green, and B represents a range fromyellow to blue) color space. And then, a luminance curve of luminancecomponent (V or L) is adjusted to change a luminance relationshipbetween a pixel before adjustment and the pixel after adjustment,thereby adjusting the image contrast.

However, the adjusted image that is obtained by the conventional methodfor adjusting the image contrast cannot fully represent details of theimage, and may destroy the distribution of bright and dark regions ofthe image. Accordingly, an ideal image adjustment effect cannot beobtained by the conventional method for adjusting the image contrast.

SUMMARY

Embodiments of the present disclosure provide an image processing methodand apparatus, thereby solving a problem that the conventional methodfor adjusting the image contrast may destroy the distribution of brightand dark regions of an image.

The image processing method includes:

converting a to-be-processed image into a gray image;

performing Guass fuzzy processing having a predefined fuzzy radius onthe gray image, and obtaining a reference image; and

according to gray values of reference pixels of the reference image,decreasing a pixel value of a pixel of the to-be-processed imagecorresponding to a reference pixel whose gray value is larger than agray threshold, increasing a pixel value of a pixel of theto-be-processed image corresponding to a reference pixel whose grayvalue is smaller than the gray threshold, and obtaining an adjustedimage.

The image processing apparatus includes:

a converting module, configured to convert a to-be-processed image intoa gray image;

a processing module, configured to perform Guass fuzzy processing havinga predefined fuzzy radius on the gray image, and obtain a referenceimage; and

an adjusting module, configured to, according to gray values ofreference pixels of the reference image, decrease a pixel value of apixel of the to-be-processed image corresponding to a reference pixelwhose gray value is larger than a gray threshold, increase a pixel valueof a pixel of the to-be-processed image corresponding to a referencepixel whose gray value is smaller than the gray threshold, and obtain anadjusted image.

In the above image processing method and apparatus, the to-be-processedimage is converted into a gray image, and Guass fuzzy processing isperformed on the gray image to obtain a reference image. The referenceimage may represent the distribution of bright and dark regions of theto-be-processed image. According to gray values of reference pixels ofthe reference image, the pixel value of a pixel of the to-be-processedimage corresponding to a reference pixel whose gray value is larger thana gray threshold is decreased. That is, the brighter pixel of theto-be-processed image is lighted down. The pixel value of a pixel of theto-be-processed image corresponding to a reference pixel whose grayvalue is smaller than the gray threshold is increased. That is, thedarker pixel of the to-be-processed image is lighted up. In this way, inthe adjusted image, the brighter region of the to-be-processed imagebecomes dark, and the darker region becomes brighter, thereby adjustingthe image contrast. Moreover, the distribution of bright and darkregions of the to-be-processed image may be maintained, and details ofthe to-be-processed image may be represented.

BRIEF DESCRIPTION OF DRAWINGS

Features of the present disclosure are illustrated by way of embodimentsand not limited in the following figure(s), in which like numeralsindicate like elements, in which:

FIG. 1 is a flowchart illustrating an image processing method accordingto an embodiment of the present disclosure.

FIG. 2 is a diagram illustrating four images during an image processingprocedure according to an embodiment of the present disclosure.

FIG. 3 is a diagram illustrating a part of a mapping table created in ascenario according to an embodiment of the present disclosure.

FIG. 4 is a diagram illustrating a to-be-processed image in a scenarioaccording to an embodiment of the present disclosure.

FIG. 5 is a diagram illustrating a reference image that is obtainedafter the to-be-processed image shown in FIG. 4 is processed accordingto an embodiment of the present disclosure.

FIG. 6 is a diagram illustrating an adjusted image obtained according tothe to-be-processed image shown in FIG. 4 and the reference image shownin FIG. 5.

FIG. 7 is a diagram illustrating the structure of an image processingapparatus according to an embodiment of the present disclosure.

FIG. 8 is a diagram illustrating the structure of an image processingapparatus according to another embodiment of the present disclosure.

FIG. 9 is a diagram illustrating the module structure of a computersystem for implementing an image processing method according to anembodiment of the present disclosure.

DETAILED DESCRIPTION

For simplicity and illustrative purposes, the present disclosure isdescribed by referring mainly to an embodiment thereof. In the followingdescription, numerous specific details are set forth in order to providea thorough understanding of the present disclosure. It will be readilyapparent however, that the present disclosure may be practiced withoutlimitation to these specific details. In other instances, some methodsand structures have not been described in detail so as not tounnecessarily obscure the present disclosure. Throughout the presentdisclosure, the terms “a” and “an” are intended to denote at least oneof a particular element. As used herein, the term “includes” meansincludes but not limited to, the term “including” means including butnot limited to. The term “based on” means based at least in part on.

Unless the number of components has been defined in contexts, the numberof components may be larger than or equal to one, which is not limitedin the embodiments of the present disclosure. The steps in theembodiments of the present disclosure are provided with reference signs,but these reference signs are not used to limit the order of the steps.Except that the order of some steps is explicitly defined and theexecution of a certain step must be based on other steps, the order ofthe steps may be adjusted. The term “and/or” is intended to denote one,any combination or all combinations of related items.

FIG. 1 is a flowchart illustrating an image processing method accordingto an embodiment of the present disclosure. The method includesfollowing blocks.

At block 102, a to-be-processed image is converted into a gray image.

The to-be-processed image refers to an image whose contrast needs to beadjusted. Because quality parameters of an image such as luminance,saturation and contrast are correlated, the adjustment to the contrastof the to-be-processed image may improve other quality parameters of theto-be-processed image.

The process of converting the to-be-processed image into the gray imageis implemented as follows. Pixels of the to-be-processed image aretraversed. In an implementation, a weighted average or an average ofthree components (Red (R), Green (G), Blue (B)) of pixel value of eachpixel of the to-be-processed image is taken as a gray value of a pixelof the gray image corresponding to the pixel of the to-be-processedimage. In another implementation, the largest or smallest one of threecomponents (R, G B) of pixel value of each pixel of the to-be-processedimage is taken as a gray value of a pixel of the gray imagecorresponding to the pixel of the to-be-processed image. In this way,the gray image may be obtained.

At block 104, Guass fuzzy processing having a predefined fuzzy radius isperformed on the gray image, and thus a reference image is obtained.

The process of performing Guass fuzzy processing having the predefinedfuzzy radius on the gray image is implemented as follows. Each pixel ofthe gray image is taken as a center pixel. A weighted average of thegray value of the center pixel and the gray values of pixels that arelocated in a circle whose center is the center pixel and radius is thepredefined fuzzy radius is calculated. The weight of gray value of eachpixel participating in the calculation of the weighted average subjectsto a two-dimensional normal distribution. The closer a pixel is from thecenter pixel, the larger the weight of the pixel is. The center pixelhas the largest weight. For each center pixel, the obtained weightedaverage is taken as the pixel value of a pixel of the reference imagecorresponding to the center pixel, thereby obtaining the referenceimage.

After Guass fuzzy processing is performed on the gray image, theinfluence of details of the gray image on the distribution of bright anddark regions may be eliminated in the obtained reference image.Accordingly, the reference image may represent the distribution ofbright and dark regions of the to-be-processed mage. Moreover, thebrightness-to-darkness transition in the reference image is smooth,thereby avoiding brightness mutation. In a subsequent process ofadjusting the pixel value of a pixel of the to-be-processed mageaccording to the reference image, not only the distribution of brightand dark regions of the to-be-processed mage is considered, but also itmay be avoided that the mutation of pixel value causes color mutation,thereby avoiding image distortion.

In this embodiment, the predefined fuzzy radius is positively correlatedto the number of row pixels and/or the number of column pixels of theto-be-processed image. The predefined fuzzy radius increases along withthe increase of the number of row pixels and/or the number of columnpixels of the to-be-processed image, and decreases along with thedecrease of the number of row pixels and/or the number of column pixelsof the to-be-processed image. The size of predefined fuzzy radiusinfluences the Guass fuzzy effect of the reference image. The smallerthe predefined fuzzy radius is, the clear the reference image is, themore the remained details are, the more complex thebrightness-to-darkness change is. On contrast, the larger the predefinedfuzzy radius is, the fuzzier the reference image is, the more theremoved details are, the smoother the brightness-to-darkness transitionis. In this embodiment, because the predefined fuzzy radius ispositively correlated to the number of row pixels and/or the number ofcolumn pixels of the to-be-processed image, no matter how the size ofthe to-be-processed image changes, the reference image having a similarfuzzy effect may be obtained. In this way, an anticipated effect may beobtained when the contrast of the to-be-processed image is adjustedaccording to the reference image.

In an embodiment, the predefined fuzzy radius may be 0.01˜0.3 times thesmaller of the number of row pixels and the number of column pixels, forexample, 0.03˜0.2 times. When the predefined fuzzy radius is 0.01˜0.3times the smaller of the number of row pixels and the number of columnpixels, the reference image may represent an ideal distribution ofbright and dark regions. When the predefined fuzzy radius is 0.03˜0.2times the smaller of the number of row pixels and the number of columnpixels, the smooth degree of brightness-to-darkness transition of thereference image is proper. Accordingly, in this case, the proper smoothdegree of the brightness-to-darkness transition of the reference imagecan be ensured. Because the proper smooth degree can be ensured, it maybe avoided that excessive smoothness makes the gray values of pixels ofthe reference image tend to be consistent, and further the influence onthe distribution of bright and dark regions of the reference image maybe avoided.

At block 106, according to the gray values of reference pixels of thereference image, the pixel value of a pixel of the to-be-processed imagecorresponding to a reference pixel whose gray value is larger than agray threshold is decreased, the pixel value of a pixel of theto-be-processed image corresponding to a reference pixel whose grayvalue is smaller than the gray threshold is increased, and thus anadjusted image is obtained.

The reference pixel refers to a pixel of the reference image. In thisembodiment, the pixel value of a pixel of the to-be-processed imagecorresponding to a reference pixel of the reference image is adjustedaccording to the gray value of the reference pixel, thereby adjustingthe contrast of the to-be-processed image.

In an implementation, reference pixels of the reference image aretraversed. It is determined whether the gray value of the currentreference pixel is larger than or equal to the gray threshold. If thegray value of the current reference pixel is larger than or equal to thegray threshold, the gray value of the current reference pixel and thepixel value of a pixel of the to-be-processed image corresponding to thecurrent reference pixel are fed into a first function to obtain afunction value. If the gray value of the current reference pixel is notlarger than or equal to the gray threshold, the gray value of thecurrent reference pixel and the pixel value of the pixel of theto-be-processed image corresponding to the current reference pixel arefed into a second function to obtain a function value. The obtainedfunction value is taken as the pixel value of a pixel of the adjustedimage corresponding to the current reference pixel, and thus theadjusted image is obtained. In this way, the increase or decrease degreeof the pixel value of each pixel of the to-be-processed image iscorrelated to the gray value of the reference pixel of the referenceimage corresponding to the pixel of the to-be-processed image. And, theincrease or decrease degree of the pixel value of each pixel of theto-be-processed image may be determined through adjusting the firstfunction and the second function according to actual requirements. Thefirst function and/or the second function may be a nonlinearity functionsuch as an exponential function, a logarithm function or a powerfunction, or may be a linearity function.

When the gray value of the current reference pixel is unequal to thegray threshold, the function value obtained through the first functionis smaller than the pixel value of pixel of the to-be-processed imagecorresponding to the current reference pixel. And thus, the pixel valueof the pixel of the to-be-processed image corresponding to the referencepixel whose gray value is larger than the gray threshold is decreased.When the gray value of the current reference pixel is unequal to thegray threshold, the function value obtained through the second functionis larger than the pixel value of the pixel of the to-be-processed imagecorresponding to the current reference pixel. And thus, the pixel valueof the pixel of the to-be-processed image corresponding to the referencepixel whose gray value is larger than the gray threshold is increased.

When the gray value of the current reference pixel is equal to the graythreshold, the function value obtained through the first function isequal to the function value obtained through the second function, andthe both function values are equal to the pixel value of the pixel ofthe to-be-processed image corresponding to the current reference pixel.In this way, the curve of the first function and the curve of the secondfunction are continuous at the gray threshold, thereby avoiding pixeljump of the adjusted image at the gray threshold and further avoidingcolor jump of the adjusted image. When the curve of the first functionand the curve of the second function form an s-curve, the contrast ofthe adjusted image is good.

In an embodiment, before block 106 is performed, normalizationprocessing is performed on the gray value of the reference pixel and thepixel value of the pixel of the to-be-processed image corresponding tothe reference pixel. After the adjusted image is generated at block 106,the functions corresponding to the above formed s-curve are applied toall pixels of the adjusted image to obtain an intermediate image. Andthen, reverse normalization processing is performed on all pixels of theintermediate to obtain a normal image. In this way, the influence ofvariant gray scales may be eliminated, computation complexity may bedecreased, and thus the efficiency of adjusting the image contrast maybe improved.

In the above image processing method, the to-be-processed image isconverted into a gray image, and Guass fuzzy processing is performed onthe gray image to obtain a reference image. The reference image mayrepresent the distribution of bright and dark regions of theto-be-processed image. According to gray values of reference pixels ofthe reference image, the pixel value of a pixel of the to-be-processedimage corresponding to a reference pixel whose gray value is larger thana gray threshold is decreased. That is, the brighter pixel of theto-be-processed image is lighted down. The pixel value of a pixel of theto-be-processed image corresponding to a reference pixel whose grayvalue is smaller than the gray threshold is increased. That is, thedarker pixel of the to-be-processed image is lighted up. In this way, inthe adjusted image, the brighter region of the to-be-processed imagebecomes dark, and the darker region becomes brighter, thereby adjustingthe image contrast. Moreover, the distribution of bright and darkregions of the to-be-processed image may be maintained, and details ofthe to-be-processed image may be represented.

In an embodiment, block 102 includes performing histogram stretch on theto-be-processed image to obtain an intermediate image, and convertingthe intermediate image into the gray image.

When performing histogram stretch on the to-be-processed image, pixelsin each level of the to-be-processed image may be accounted. Then,according to a predefined algorithm, linearity extension ornon-linearity extension is performed on pixels distributed centrally inthe to-be-processed image, so that the pixels of the to-be-processedimage may be distributed in a larger range. In this embodiment,histogram stretch is performed on the to-be-processed image to obtain anintermediate image. And thus, the contrast of the intermediate image isimproved, and the contrast between the brightness and the darkness isimproved. In this way, the distribution of bright and dark regions ofthe reference image is represented clearly, and the contrast of theadjusted image becomes more obvious. When the contrast of theto-be-processed image is worse, for example an image shot at night, thecontrast of the intermediate image obtained through performing histogramstretch is better than the contrast of the to-be-processed image.

FIG. 2 shows four images during an image processing procedure. The fourimages include a to-be-processed image 2 a, a reference image 2 b, animage 2 c and a reference image 2 d. The reference image 2 b is obtainedthrough converting the to-be-processed image 2 a into a gray image andperforming Guass fuzzy processing (which takes one-tenth of columnpixels as a fuzzy radius) on the gray image. The image 2 c is obtainedthrough performing histogram stretch on the to-be-processed image 2 a.The reference image 2 d is generated through converting the image 2 cinto a gray image and performing Guass fuzzy processing (which takesone-tenth of column pixels as the fuzzy radius) on the gray image.Obviously, because the contrast of the to-be-processed image 2 a issmall, the gray values of pixels of the reference image 2 b tend to beconsistent. In this case, the reference image 2 b cannot represent thedistribution of bright and dark regions of the to-be-processed image 2a. However, because the reference image 2 d is obtained based on theimage 2 c that is obtained through performing histogram stretch on theto-be-processed image 2 a, the reference image 2 d may represent thedistribution of bright and dark regions of the to-be-processed image 2a.

In an embodiment, block 106 includes searching a predefined mappingtable for a mapping value according to the gray value of a referencepixel of the reference image and the pixel value of a pixel of theto-be-processed image corresponding to the reference pixel, andgenerating the adjusted image according to the searched-out mappingvalue. If the gray value of the reference pixel is larger than the graythreshold, the mapping value is smaller than the pixel value of thepixel of the to-be-processed image corresponding to the reference pixel.If the gray value of the reference pixel is smaller than the graythreshold, the mapping value is larger than the pixel value of the pixelof the to-be-processed image corresponding to the reference pixel.

In this embodiment, the predefined mapping table includes a mappingrelationship among the gray value of the reference pixel, the pixelvalue of the pixel of the to-be-processed image and the pixel value ofthe pixel of the adjusted image. When the contrast of theto-be-processed image is adjusted, according to the gray value of thereference pixel and the pixel value of the pixel of the to-be-processedimage corresponding to the reference pixel, the mapping table issearched to search out a mapping value. And then, the mapping value istaken as the pixel value of a pixel of the adjusted image correspondingto the reference pixel, thereby obtaining the adjusted image.

The mapping value in the mapping table has features (1) and (2). Feature(1) is described as follows. If the gray value of the reference pixel islarger than the gray threshold, the mapping value is smaller than thepixel value of the pixel of the to-be-processed image corresponding tothe reference pixel. Feature (2) is described as follows. If the grayvalue of the reference pixel is smaller than the gray threshold, themapping value is larger than the pixel value of the pixel of theto-be-processed image corresponding to the reference pixel. In this way,the pixel value of a pixel of the to-be-processed image corresponding toa reference pixel whose gray value is larger than the gray threshold isdecreased. The pixel value of a pixel of the to-be-processed imagecorresponding to a reference pixel whose gray value is smaller than thegray threshold is increased.

In this embodiment, through obtaining the mapping value from the mappingtable to generate the adjusted image, an operation speed may be improvedgreatly, thereby meeting the requirements on the rapid adjustment ofimage contrast.

In an embodiment, the image processing method further includesgenerating the mapping table. The process of generating the mappingtable is implemented as follows.

A range of the gray value and the pixel value is traversed, and amapping value is calculated according to the gray value, the pixel valueand the gray threshold. A mapping value that is obtained according tothe gray value larger than the gray threshold is smaller than the pixelvalue, and a mapping value that is obtained according to the gray valuesmaller than the gray threshold is larger than the pixel value.

The range of the gray value and the pixel value is [0, 255]. The grayvalue and the pixel value may be given with each one of [0, 255], and amapping value corresponding to each gray value and pixel value iscalculated. Further, when the mapping value corresponding to each grayvalue and pixel value is calculated, it is determined whether thecurrent gray value is larger than or equal to the gray threshold. If thecurrent gray value is larger than or equal to the gray threshold, thecurrent gray value and the current pixel value are fed into a firstfunction to obtain a mapping value. If the current gray value is notlarger than or equal to the gray threshold, the current gray value andthe current pixel value are fed into a second function to obtain amapping value. The first function and/or the second function may be anonlinearity function such as an exponential function, a logarithmfunction or a power function, or may be a linearity function.

When the current gray value is unequal to the gray threshold, themapping value obtained through the first function is smaller than thecurrent pixel value, and the mapping value obtained through the secondfunction is larger than the current pixel value. When the current grayvalue is equal to the gray threshold, the mapping value obtained throughthe first function is equal to the mapping value obtained through thesecond function, and is equal to the current pixel value. In this way,the curve of the first function and the curve of the second function arecontinuous at the gray threshold, thereby avoiding color jump caused bypixel jump. When the curve of the first function and the curve of thesecond function form an s-curve, the contrast of the adjusted image isgood.

A mapping table is created according to the gray value, the pixel valueand the obtained mapping value.

According to the gray value, the pixel value and the obtained mappingvalue, a 256*256 two-dimensional mapping table may be created. The pixelvalue is composed of three components (R, G, B). The value ranges of thethree components are also [0, 255] respectively. Based on one of thethree components and a gray value, a mapping value may be calculated. Ifone of the three components has the same value with another one of thethree components and the gray values are the same, the obtained twomapping values are also the same. No matter which component, if thevalues of components are the same, the mapping values corresponding tothe same gray values are the same. Accordingly, only one 256*256two-dimensional mapping table needs to be created, without needing tocreate three 256*256 two-dimensional mapping tables. Further, theperformance of the 256*256 two-dimensional mapping table is better thanthat of the three 256*256 two-dimensional mapping table.

In this embodiment, by the created mapping table, the mapping value maybe searched out rapidly, thereby improving the efficiency of adjustingthe image contrast.

In an embodiment, an adjustment degree of the pixel value of a pixel ofthe to-be-processed image is correlated to a predefined adjustmentdegree parameter; and/or the mapping value in the mapping table isgenerated according to the predefined adjustment degree parameter.

In this embodiment, the adjustment degree of the value of the pixel ofthe to-be-processed image is not only correlated to the gray value ofthe reference pixel corresponding to the pixel of the to-be-processedimage, but also is correlated to the predefined adjustment degreeparameter. The predefined adjustment degree parameter is introduced intothe process of generating the mapping value in the mapping table. Anargument such as the predefined adjustment degree parameter may beintroduced into the first function and the second function. The decreaseor increase degree of the value of the pixel of the to-be-processedimage may be adjusted through adjusting the size of the predefinedadjustment degree parameter, thereby controlling the adjustment effectof the image contrast.

In this embodiment, a user may control the decrease or increase degreeof the value of the pixel of the to-be-processed image throughpredefining the size of the adjustment degree parameter, therebycontrolling the adjustment degree of the image contrast according toactual requirements, and further improving the compatibility of theimage processing method.

The image processing method will be illustrated with reference to ascenario hereinafter.

The gray value and the pixel value are given with each one of [0, 255].The gray value and the pixel value larger than or equal to the graythreshold are fed into the first function to obtain a mapping value. Thegray value and the pixel value smaller than the gray threshold are fedinto the second function to obtain a mapping value. Then, atow-dimensional mapping table is created, as shown in FIG. 3. Onedimensionality 302 of the mapping table represents the gray value, andthe other dimensionality 304 of the mapping table represents the pixelvalue. The obtained mapping value is filled into a location 306corresponding to the gray value and the pixel value, and finally a256*256 tow-dimensional mapping table is obtained.

FIG. 4 is a diagram illustrating a to-be-processed image. As can be seenfrom FIG. 4, a dark part of the to-be-processed image is too dark, forexample, parts 402 and 404 shown in FIG. 4, but a bright part of theto-be-processed image is too bright, for example, a part 406 shown inFIG. 4. Accordingly, the details of the to-be-processed image aredifficult to be represented clearly, for example, a pipeline in the part404 shown in FIG. 4. Thus, it is needed to adjust the contrast of theto-be-processed image shown in FIG. 4.

The to-be-processed image shown in FIG. 4 is converted into a gray imagethrough performing histogram stretch on the to-be-processed image, andthen Guass fuzzy processing is performed on the gray image to obtain areference image shown in FIG. 5. The Guass fuzzy processing takesone-tenth of row pixels as the fuzzy radius because the number of rowpixels is smaller than the number of column pixels. As can be seen, thedetails of the to-be-processed image shown in FIG. 4 are removed fromthe reference image shown in FIG. 5, but the distribution of bright anddark regions of the to-be-processed image is reserved. Accordingly, thebrightness-to-darkness transition in the reference image is smooth,thereby avoiding brightness mutation.

According to the gray value of each reference pixel of the referenceimage shown in FIG. 5 and the pixel value of the pixel of theto-be-processed image shown in FIG. 4 corresponding to the referencepixel, the mapping table is searched to obtain a mapping value, and theadjusted image shown in FIG. 6 is generated according to the obtainedmapping value. As can be seen, compared with the dark parts (forexample, the parts 402 and 404 shown in FIG. 4) of the to-be-processedimage and the bright part (for example, the part 406 shown in FIG. 4) ofthe to-be-processed image, dark parts (for example, parts 602 and 604shown in FIG. 6) of the adjusted image shown in FIG. 6 become bright,and a bright part (for example, a part 606 shown in FIG. 6) of theadjusted image shown in FIG. 6 becomes dark. The difference between thebrightness and the darkness is decreased, and the image contrast isdecreased. Moreover, the distribution of bright and dark regions of theto-be-processed image is reserved. Accordingly, thebrightness-to-darkness transition in the adjusted image is smooth,thereby improving the image effect.

FIG. 7 is a diagram illustrating the structure of an image processingapparatus according to an embodiment of the present disclosure. Theapparatus includes a converting module 702, a processing module 704 andan adjusting module 706.

The converting module 702 may convert a to-be-processed image into agray image.

The converting module 702 may traverse pixels of the to-be-processedimage, and take a weighted average or an average of three components (R,G, B) of pixel value of each pixel of the to-be-processed image as agray value of a pixel of the gray image corresponding to the pixel ofthe to-be-processed image, or take the largest or smallest one of threecomponents (R, G B) of pixel value of each pixel of the to-be-processedimage as a gray value of a pixel of the gray image corresponding to thepixel of the to-be-processed image. In this way, the gray image may beobtained.

The processing module 704 may perform Guass fuzzy processing having apredefined fuzzy radius on the gray image, and thus obtain a referenceimage.

The processing module 704 may take each pixel of the gray image as acenter pixel, calculate a weighted average of the gray value of thecenter pixel and the gray values of pixels that are located in a circlewhose center is the center pixel and radius is the predefined fuzzyradius. The weight of gray value of each pixel participating in thecalculation of the weighted average subjects to a two-dimensional normaldistribution. The closer a pixel is from the center pixel, the largerthe weight of the pixel is. The center pixel has the largest weight. Foreach center pixel, the obtained weighted average is taken as the pixelvalue of a pixel of the reference image corresponding to the centerpixel, thereby obtaining the reference image.

After the processing module 704 performs Guass fuzzy processing on thegray image, the influence of details of the gray image on thedistribution of bright and dark regions may be eliminated in theobtained reference image. Accordingly, the reference image may representthe distribution of bright and dark regions of the to-be-processed mage.Moreover, the brightness-to-darkness transition in the reference imageis smooth, thereby avoiding brightness mutation. In a subsequent processof adjusting the pixel value of a pixel of the to-be-processed mageaccording to the reference image, not only the distribution of brightand dark regions of the to-be-processed mage is considered, but also itmay be avoided that the mutation of pixel value causes color mutation,thereby avoiding image distortion.

According to a gray values of reference pixels of the reference image,the adjusting module 706 may decrease the pixel value of a pixel of theto-be-processed image corresponding to a reference pixel whose grayvalue is larger than a gray threshold, increase the pixel value of apixel of the to-be-processed image corresponding to a reference pixelwhose gray value is smaller than the gray threshold, and thus obtain anadjusted image.

The reference pixel refers to a pixel of the reference image. Theadjusting module 706 may adjust the pixel value of a pixel of theto-be-processed image corresponding to a reference pixel of thereference image according to the gray value of the reference pixel,thereby adjusting the contrast of the to-be-processed image.

In an implementation, the adjusting module 706 may traverse referencepixels of the reference image, and determines whether the gray value ofthe current reference pixel is larger than or equal to the graythreshold. If the gray value of the current reference pixel is largerthan or equal to the gray threshold, the adjusting module 706 feeds thegray value of the current reference pixel and the pixel value of a pixelof the to-be-processed image corresponding to the current referencepixel into a first function to obtain a function value. If the grayvalue of the current reference pixel is not larger than or equal to thegray threshold, the adjusting module 706 feeds the gray value of thecurrent reference pixel and the pixel value of the pixel of theto-be-processed image corresponding to the current reference pixel intoa second function to obtain a function value. The adjusting module 706takes the obtained function value as the pixel value of a pixel of theadjusted image corresponding to the current reference pixel, and thusobtains the adjusted image. In this way, the increase or decrease degreeof the pixel value of each pixel of the to-be-processed image iscorrelated to the gray value of the reference pixel of the referenceimage corresponding to the pixel of the to-be-processed image. And, theincrease or decrease degree of the pixel value of each pixel of theto-be-processed image may be determined through adjusting the firstfunction and the second function according to actual requirements. Thefirst function and/or the second function may be a nonlinearity functionsuch as an exponential function, a logarithm function or a powerfunction, or may be a linearity function.

When the gray value of the current reference pixel is unequal to thegray threshold, the function value obtained through the first functionis smaller than the pixel value of pixel of the to-be-processed imagecorresponding to the current reference pixel, and thus the pixel valueof the pixel of the to-be-processed image corresponding to the referencepixel whose gray value is larger than the gray threshold is decreased.The function value obtained through the second function is larger thanthe pixel value of the pixel of the to-be-processed image correspondingto the current reference pixel, and thus the pixel value of the pixel ofthe to-be-processed image corresponding to the reference pixel whosegray value is larger than the gray threshold is increased.

When the gray value of the current reference pixel is equal to the graythreshold, the function value obtained through the first function isequal to the function value obtained through the second function, andthe both function values are equal to the pixel value of the pixel ofthe to-be-processed image corresponding to the current reference pixel.In this way, the curve of the first function and the curve of the secondfunction are continuous at the gray threshold, thereby avoiding pixeljump of the adjusted image at the gray threshold and further avoidingcolor jump of the adjusted image. When the curve of the first functionand the curve of the second function form an s-curve, the contrast ofthe adjusted image is good.

In the above image processing apparatus, the to-be-processed image isconverted into a gray image, and Guass fuzzy processing is performed onthe gray image to obtain a reference image. The reference image mayrepresent the distribution of bright and dark regions of theto-be-processed image. According to gray values of reference pixels ofthe reference image, the pixel value of a pixel of the to-be-processedimage corresponding to a reference pixel whose gray value is larger thana gray threshold is decreased. That is, the brighter pixel of theto-be-processed image is lighted down. The pixel value of a pixel of theto-be-processed image corresponding to a reference pixel whose grayvalue is smaller than the gray threshold is increased. That is, thedarker pixel of the to-be-processed image is lighted up. In this way, inthe adjusted image, the brighter region of the to-be-processed imagebecomes dark, and the darker region becomes brighter, thereby adjustingthe image contrast. Moreover, the distribution of bright and darkregions of the to-be-processed image may be maintained, and details ofthe to-be-processed image may be represented.

In an embodiment, the adjusting module 706 may perform normalizationprocessing on the gray value of the reference pixel and the pixel valueof the pixel of the to-be-processed image corresponding to the referencepixel before adjusting the pixel of the to-be-processed image. After theadjusted image is generated, the adjusting module 706 may apply thefunctions corresponding to the above formed s-curve to all pixels of theadjusted image to obtain an intermediate image, and perform reversenormalization processing on all pixels of the intermediate, and thusobtain a normal image. In this way, the influence of variant gray scalesmay be eliminated, computation complexity may be decreased, and thus theefficiency of adjusting the image contrast may be improved.

In an embodiment, the converting module 702 may perform histogramstretch on the to-be-processed image to obtain an intermediate image,and convert the intermediate image into the gray image.

In an implementation, the converting module 702 may account pixels ineach level of the to-be-processed image. Then, according to a predefinedalgorithm, the converting module 702 performs linearity extension ornon-linearity extension on pixels distributed centrally in theto-be-processed image, so that the pixels of the to-be-processed imagemay be distributed in a larger range. In this embodiment, histogramstretch is performed on the to-be-processed image to obtain anintermediate image, thus the contrast of the intermediate image isimproved and the contrast between the brightness and the darkness isimproved. In this way, the distribution of bright and dark regions ofthe reference image is represented clearly, and the contrast of theadjusted image becomes more obvious. When the contrast of theto-be-processed image is worse, for example an image shot at night, thecontrast of the intermediate image obtained through performing histogramstretch is better than the contrast of the to-be-processed image.

In this embodiment, the predefined fuzzy radius is positively correlatedto the number of row pixels and/or the number of column pixels of theto-be-processed image. The predefined fuzzy radius increases along withthe increase of the number of row pixels and/or the number of columnpixels of the to-be-processed image, and decreases along with thedecrease of the number of row pixels and/or the number of column pixelsof the to-be-processed image. The size of predefined fuzzy radiusinfluences the Guass fuzzy effect of the reference image. The smallerthe predefined fuzzy radius is, the clear the reference image is, themore the remained details are, the more complex thebrightness-to-darkness change is. On contrast, the larger the predefinedfuzzy radius is, the fuzzier the reference image is, the more theremoved details are, the smoother the brightness-to-darkness transitionis. In this embodiment, because the predefined fuzzy radius ispositively correlated to the number of row pixels and/or the number ofcolumn pixels of the to-be-processed image, no matter how the size ofthe to-be-processed image changes, the reference image having a similarfuzzy effect may be obtained. In this way, an anticipated effect may beobtained when the contrast of the to-be-processed image is adjustedaccording to the reference image.

In an embodiment, the predefined fuzzy radius may be 0.01˜0.3 times thesmaller of the number of row pixels and the number of column pixels, forexample, 0.03˜0.2 times. When the predefined fuzzy radius is 0.01˜0.3times the smaller of the number of row pixels and the number of columnpixels, the reference image may represent an ideal distribution ofbright and dark regions. When the predefined fuzzy radius is 0.03˜0.2times the smaller of the number of row pixels and the number of columnpixels, the smooth degree of brightness-to-darkness transition of thereference image is proper. Accordingly, in this case, the proper smoothdegree of the brightness-to-darkness transition of the reference imagecan be ensured. Because the proper smooth degree can be ensured, it maybe avoided that excessive smoothness makes the gray values of pixels ofthe reference image tend to be consistent, and further the influence onthe distribution of bright and dark regions of the reference image maybe avoided.

In an embodiment, the adjusting module 706 may search a predefinedmapping table for a mapping value according to the gray value of areference pixel of the reference image and the pixel value of a pixel ofthe to-be-processed image corresponding to the reference pixel, andgenerate the adjusted image according to the searched-out mapping value.If the gray value of the reference pixel is larger than the graythreshold, the mapping value is smaller than the pixel value of thepixel of the to-be-processed image corresponding to the reference pixel.If the gray value of the reference pixel is smaller than the graythreshold, the mapping value is larger than the pixel value of the pixelof the to-be-processed image corresponding to the reference pixel.

In this embodiment, the predefined mapping table includes a mappingrelationship among the gray value of the reference pixel, the pixelvalue of the pixel of the to-be-processed image and the pixel value ofthe pixel of the adjusted image. According to the gray value of thereference pixel and the pixel value of the pixel of the to-be-processedimage corresponding to the reference pixel, the adjusting module 706 maysearch the mapping table for a mapping value, take the mapping value asthe pixel value of a pixel of the adjusted image corresponding to thereference pixel, and thus obtain the adjusted image.

The mapping value in the mapping table has features (1) and (2). Feature(1) is described as follows. If the gray value of the reference pixel islarger than the gray threshold, the mapping value is smaller than thepixel value of the pixel of the to-be-processed image corresponding tothe reference pixel. Feature (2) is described as follows. If the grayvalue of the reference pixel is smaller than the gray threshold, themapping value is larger than the pixel value of the pixel of theto-be-processed image corresponding to the reference pixel. In this way,the pixel value of a pixel of the to-be-processed image corresponding toa reference pixel whose gray value is larger than the gray threshold isdecreased. The pixel value of a pixel of the to-be-processed imagecorresponding to a reference pixel whose gray value is smaller than thegray threshold is increased.

In this embodiment, through obtaining the mapping value from the mappingtable to generate the adjusted image, an operation speed may be improvedgreatly, thereby meeting the requirements on the rapid adjustment ofimage contrast.

In an embodiment, the apparatus further includes a generating module701, configured to generating the mapping table, as shown in FIG. 8. Thegenerating module 701 includes a calculating sub-module 701 a and agenerating sub-module 701 b.

The calculating sub-module 701 a may traverse a range of the gray valueand the pixel value, and calculate a mapping value according to the grayvalue, the pixel value and the gray threshold. A mapping value that isobtained according to the gray value larger than the gray threshold issmaller than the pixel value, and a mapping value that is obtainedaccording to the gray value smaller than the gray threshold is largerthan the pixel value.

The range of the gray value and the pixel value is [0, 255]. Thecalculating sub-module 701 a may give the gray value and the pixel valuewith each one of [0, 255], and calculate a mapping value correspondingto each gray value and pixel value. Further, when the mapping valuecorresponding to each gray value and pixel value is calculated, thecalculating sub-module 701 a determines whether the current gray valueis larger than or equal to the gray threshold. If the current gray valueis larger than or equal to the gray threshold, the calculatingsub-module 701 a feeds the current gray value and the current pixelvalue into a first function to obtain a mapping value. If the currentgray value is not larger than or equal to the gray threshold, thecalculating sub-module 701 a feeds the current gray value and thecurrent pixel value into a second function to obtain a mapping value.The first function and/or the second function may be a nonlinearityfunction such as an exponential function, a logarithm function or apower function, or may be a linearity function.

When the current gray value is unequal to the gray threshold, themapping value obtained through the first function is smaller than thecurrent pixel value, and the mapping value obtained through the secondfunction is larger than the current pixel value. When the current grayvalue is equal to the gray threshold, the mapping value obtained throughthe first function is equal to the mapping value obtained through thesecond function, and is equal to the current pixel value. In this way,the curve of the first function and the curve of the second function arecontinuous at the gray threshold, thereby avoiding color jump caused bypixel jump. When the curve of the first function and the curve of thesecond function form an s-curve, the contrast of the adjusted image isgood.

The creating sub-module 701 b may create the mapping table according tothe gray value, the pixel value and the obtained mapping value.

According to the gray value, the pixel value and the obtained mappingvalue, the creating sub-module 701 b may create a 256*256two-dimensional mapping table. The pixel value is composed of threecomponents (R, G, B). The value ranges of the three components are also[0, 255] respectively. Based on one of the three components and a grayvalue, a mapping value may be calculated. If one of the three componentshas the same value with another one of the three components and the grayvalues are the same, the obtained two mapping values are also the same.No matter which component, if the values of components are the same, themapping values corresponding to the same gray values are the same.Accordingly, only one 256*256 two-dimensional mapping table needs to becreated, without needing to create three 256*256 two-dimensional mappingtables. Further, the performance of the 256*256 two-dimensional mappingtable is better than that of the three 256*256 two-dimensional mappingtables.

In this embodiment, the generating module 701 may create the mappingtable. By the created mapping table, the mapping value may be searchedout rapidly, thereby improving the efficiency of adjusting the imagecontrast.

In an embodiment, an adjustment degree of the value of a pixel of theto-be-processed image is correlated to a predefined adjustment degreeparameter; and/or the mapping value in the mapping table is generatedaccording to the predefined adjustment degree parameter.

In this embodiment, the adjustment degree of the value of the pixel ofthe to-be-processed image is not only correlated to the gray value ofthe reference pixel corresponding to the pixel of the to-be-processedimage, but also is correlated to the predefined adjustment degreeparameter. The predefined adjustment degree parameter is introduced intothe process of generating the mapping value in the mapping table. Anargument such as the predefined adjustment degree parameter may beintroduced into the first function and the second function, and thedecrease or increase degree of the value of the pixel of theto-be-processed image may be adjusted through adjusting the size of thepredefined adjustment degree parameter, thereby controlling theadjustment effect of the image contrast.

In this embodiment, a user may control the decrease or increase degreeof the value of the pixel of the to-be-processed image throughpredefining the size of the adjustment degree parameter, therebycontrolling the adjustment degree of the image contrast according toactual requirements, and further improving the compatibility of theimage processing method.

FIG. 9 is a diagram illustrating the structure of a computer system 1000for implementing the image processing method and apparatus provided bythe embodiments of the present disclosure. The computer system 1000 isan example applicable to the embodiments of the present disclosure, andis not used to limit the protection scope of the present disclosure.

The computer system 1000 shown in FIG. 9 is an example applicable to theembodiments of the present disclosure, and may have another structurehaving different sub-system configurations. For example, a desktop, alaptop, a Personal Digital Assistant (PDA), a smart phone, a tabletPersonal Computer (PC), a portable media player, a set-top-box andanother similar device may be applicable to the embodiments of thepresent disclosure.

As shown in FIG. 9, the computer system 1000 includes a processor 1010,a storage 1020 and a system bus 1022. Various components including thestorage 1020 and the processor 1010 are all connected to the system bus1022. The processor 1020 is hardware for executing computer programinstructions through basic arithmetic and logic operations. The storage1020 is a physical device for temporally or permanently store computerprograms or data (for example, program state information). The systembus 1020 may be any one of following types of buses, and includes astorage bus or a storage controller, a peripheral bus and a local bus.The processor 1010 and the storage 1020 may communicate with each otherthrough the system bus 1022. The storage 1020 includes a read-onlymemory (ROM) or a flash (not shown in drawings), and a Random AccessMemory (RAM). The RAM refers to a primary storage in which an operationsystem and an application is loaded.

The computer system 1000 also includes a display interface 1030 (forexample, a GUI processing unit), a display device 1040 (for example, aLiquid Crystal Display (LCD)), an audio interface 1050 (for example, asound card) and an audio device 1060 (for example, a speaker). Thedisplay device 1040 and the audio device 1060 are media devices forplaying media contents.

The computer system 1000 includes a storage device 1070. The storagedevice 1070 may be one of multiple computer readable mediums. Thecomputer readable mediums refer to any available medium that may beaccessed through the computer system 1000, and may include mobile andfixed mediums. For example, the computer readable mediums include, butare not limited to, a flash memory (a minisize Secure Digital (SD)memory card), a CD-ROM, a Digital Video Disc (DVD), a CD storage, amagnetic tape, a disk storage or other magnetic storage devices, or anyother medium that may store information and may be accessed by thecomputer system 1000.

The computer system 1000 also includes an input device 1080 and an inputinterface 1090 (for example, an IO controller). A user may inputinstructions and information into the computer system 1000 through theinput device 1080 (for example, a keyboard, a mouse and a touch paneldevice on the display apparatus 1040). The input device 1080 isconnected to the system bus 1022 through the input interface 1090 orthrough other interfaces or bus structures, for example, a UniversalSerial Bus (USB).

The computer system 1000 may be connected to one or more network deviceslogically in a network. The network device may be a personal computer, aserver, a router, a smart phone, a tablet computer or another publicnetwork node. The computer system 1000 is connected to the networkdevice through a Local Area Network (LAN) interface 1100 or a mobilecommunication unit 1110. The LAN refers to a computer network in afinite region such as a house, a school, a computer laboratory or anoffice building using network mediums. WiFi and twisted-pair Ethernetare commonly used technologies for creating the LAN. WiFi is atechnology allowing the computer system 1000 to exchange data or to beconnected to a radio network through radio wave. The mobilecommunication unit 1110 may answer or dial a phone through a radiocommunication line in a large geographical region. In addition, themobile communication unit 1110 supports Internet access in 2G, 3G and 4Gcommunication systems providing mobile data services.

The computer system 1000 may include more or less components in anotherembodiment. For example, the computer system 1000 may include aBluetooth for exchanging data in a short range, an image sensor for shotand an accelerometer for measuring acceleration.

The computer system 1000 may execute the operations of the imageprocessing method. The computer system 1000 may execute the operationsin the form of executing software instructions in the computer readablemedium by the processor 1010. The software instructions may be writteninto the storage 1020 from the storage device 1070 or from anotherdevice through the LAN interface 1100. The software instructions storedin the storage 1020 make the processor 1010 execute the above imageprocessing method. In addition, the image processing method may beimplemented through a hardware circuit or through the combination of thehardware circuit and the software instructions. Accordingly, the presentdisclosure is not limited to any combination of the hardware circuit andthe software instructions.

Although described specifically throughout the entirety of the instantdisclosure, representative embodiments of the present disclosure haveutility over a wide range of applications, and the above discussion isnot intended and should not be construed to be limiting, but is offeredas an illustrative discussion of aspects of the disclosure.

What has been described and illustrated herein is an embodiment alongwith some of its variations. The terms, descriptions and figures usedherein are set forth by way of illustration only and are not meant aslimitations. Many variations are possible within the spirit and scope ofthe subject matter, which is intended to be defined by the followingclaims—and their equivalents—in which all terms are meant in theirbroadest reasonable sense unless otherwise indicated.

The foregoing is only several embodiments of the present disclosure, andthe protection scope of the present disclosure is not limited to this.It should be noted that any modification and improvement which can bemade by those skilled in the art within the principle of the presentdisclosure should be covered in the protection scope of the presentdisclosure. And thus, the protection scope of the present disclosureshould be defined by the claims.

What is claimed is:
 1. An image processing method, comprising:converting a to-be-processed image into a gray image; performingGaussian blur processing having a predefined blur radius on the grayimage, and obtaining a reference image; and according to gray values ofreference pixels of the reference image, decreasing a pixel value of apixel of a copy of the to-be-processed image corresponding to areference pixel whose gray value is larger than a gray threshold,increasing a pixel value of a pixel of the copy of the to-be-processedimage corresponding to a reference pixel whose gray value is smallerthan the gray threshold, and obtaining an adjusted image; wherein theaccording to the gray values of the reference pixels of the referenceimage, decreasing the pixel value of the pixel of the copy of theto-be-processed image corresponding to the reference pixel whose grayvalue is larger than the gray threshold, increasing the pixel value ofthe pixel of the copy of the to-be-processed image corresponding to thereference pixel whose gray value is smaller than the gray threshold, andobtaining an adjusted image comprises: searching a predefined mappingtable for a mapping value according to the gray value of each referencepixel of the reference image and the pixel value of a pixel of the copyof the to-be-processed image corresponding to the reference pixel, andgenerating the adjusted image according to the searched-out mappingvalue.
 2. The method of claim 1, wherein if the gray value of areference pixel is larger than the gray threshold, a mapping value issmaller than the pixel value of a pixel of the copy of the to-beprocessed image corresponding to the reference pixel; and if the grayvalue of a reference pixel is smaller than the gray threshold, themapping value is larger than the pixel value of a pixel of the copy ofthe to-be-processed image corresponding to the reference pixel.
 3. Themethod of claim 1, further comprising: generating the mapping table,wherein the generating the mapping table comprises: traversing a rangeof the gray values and the pixel values, calculating a mapping valueaccording to a gray value, a pixel value and the gray threshold; whereina mapping value that is obtained according to the gray value larger thanthe gray threshold is smaller than the pixel value, and a mapping valuethat is obtained according to the gray value smaller than the graythreshold is larger than the pixel value; and creating the mapping tableaccording to the gray value, the pixel value and the mapping value. 4.The method of claim 1, wherein an adjustment degree of pixel value of apixel of the copy of the to-be-processed image is correlated to apredefined adjustment degree parameter; and the mapping value in themapping table is generated according to the predefined adjustment degreeparameter.
 5. The method of claim 1, wherein the predefined fuzzy radiusis positively correlated to at least one of the number of row pixels ofthe to-be-processed image and the number of column pixels of theto-be-processed image.
 6. An image processing apparatus, comprising aprocessor and a non-transitory storage, wherein the non-transitorystorage stores one or more computer readable instructions to be executedby the processor, and the one or more computer readable instructionscomprise a converting instruction, a processing instruction and anadjusting instruction; the processor executes the converting instructionto convert a to-be-processed image into a gray image; the processorexecutes the processing instruction to perform Gaussian blur processinghaving a predefined blur radius on the gray image, and obtain areference image; and the processor executes the adjusting instructionto, according to gray values of reference pixels of the reference image,decrease a pixel value of a pixel of a copy of the to-be-processed imagecorresponding to a reference pixel whose gray value is larger than agray threshold, increase a pixel value of a pixel of the copy of theto-be-processed image corresponding to a reference pixel whose grayvalue is smaller than the gray threshold, and obtain an adjusted image;wherein the adjusting instruction comprises one or moresub-instructions, and the processor executes the one or moresub-instructions to search a predefined mapping table for a mappingvalue according to the gray value of each reference pixel of thereference image and the pixel value of a pixel of the copy of theto-be-processed image corresponding to the reference pixel, and generatethe adjusted image according to the searched-out mapping value.
 7. Theapparatus of claim 6, wherein if the gray value of a reference pixel islarger than the gray threshold, a mapping value is smaller than thepixel value of a pixel of the copy of the to-be processed imagecorresponding to the reference pixel; and if the gray value of areference pixel is smaller than the gray threshold, the mapping value islarger than the pixel value of a pixel of the copy of theto-be-processed image corresponding to the reference pixel.
 8. Theapparatus of claim 6, wherein the one or more instructions furthercomprise a generating instruction; the processor executes the generatinginstruction to generate the mapping table, wherein the generatinginstruction comprises one or more sub-instructions, and the processorexecutes the one or more sub-instructions to traverse a range of thegray values and the pixel values, calculate a mapping value according toa gray value, a pixel value and the gray threshold; wherein a mappingvalue that is obtained according to the gray value larger than the graythreshold is smaller than the pixel value, and a mapping value that isobtained according to the gray value smaller than the gray threshold islarger than the pixel value; and create the mapping table according tothe gray value, the pixel value and the mapping value.
 9. The apparatusof claim 6, wherein an adjustment degree of pixel value of a pixel ofthe copy of the to-be-processed image is correlated to a predefinedadjustment degree parameter; and the mapping value in the mapping tableis generated according to the predefined adjustment degree parameter.10. The apparatus of claim 6, wherein the predefined fuzzy radius ispositively correlated to at least one of the number of row pixels of theto-be-processed image and the number of column pixels of theto-be-processed image.
 11. A non-transitory computer readable medium,comprising: one or more computer readable instructions, wherein the oneor more computer readable instructions are executed by a processor toimplement a process of: converting a to-be-processed image into a grayimage; performing Gaussian blur processing having a predefined blurradius on the gray image, and obtaining a reference image; and accordingto gray values of reference pixels of the reference image, decreasing apixel value of a pixel of a copy of the to-be-processed imagecorresponding to a reference pixel whose gray value is larger than agray threshold, increasing a pixel value of a pixel of the copy of theto-be-processed image corresponding to a reference pixel whose grayvalue is smaller than the gray threshold, and obtaining an adjustedimage; wherein the according to the gray values of the reference pixelsof the reference image, decreasing the pixel value of the pixel of thecopy of the to-be-processed image corresponding to the reference pixelwhose gray value is larger than the gray threshold, increasing the pixelvalue of the pixel of the copy of the to-be-processed imagecorresponding to the reference pixel whose gray value is smaller thanthe gray threshold, and obtaining an adjusted image comprises: searchinga predefined mapping table for a mapping value according to the grayvalue of each reference pixel of the reference image and the pixel valueof a pixel of the copy of the to-be-processed image corresponding to thereference pixel, and generating the adjusted image according to thesearched-out mapping value.
 12. The non-transitory computer readablemedium of claim 11, wherein if the gray value of a reference pixel islarger than the gray threshold, a mapping value is smaller than thepixel value of a pixel of the copy of the to-be processed imagecorresponding to the reference pixel; and if the gray value of areference pixel is smaller than the gray threshold, the mapping value islarger than the pixel value of a pixel of the copy of theto-be-processed image corresponding to the reference pixel.
 13. Thenon-transitory computer readable medium of claim 11, further comprisinga computer readable instruction, wherein the computer readableinstruction is executed by the processor to implement a process of:generating the mapping table, wherein the generating the mapping tablecomprises: traversing a range of the gray values and the pixel values,calculating a mapping value according to a gray value, a pixel value andthe gray threshold; wherein a mapping value that is obtained accordingto the gray value larger than the gray threshold is smaller than thepixel value, and a mapping value that is obtained according to the grayvalue smaller than the gray threshold is larger than the pixel value;and creating the mapping table according to the gray value, the pixelvalue and the mapping value.
 14. The non-transitory computer readablemedium of claim 11, wherein an adjustment degree of pixel value of apixel of the copy of the to-be-processed image is correlated to apredefined adjustment degree parameter; and the mapping value in themapping table is generated according to the predefined adjustment degreeparameter.
 15. The non-transitory computer readable medium of claim 11,wherein the predefined fuzzy radius is positively correlated to at leastone of the number of row pixels of the to-be-processed image and thenumber of column pixels of the to-be-processed image.